<!DOCTYPE html>
<html lang="ch" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>用户管理</title>
    <link href="/assets/css/bootstrap.min.css" rel="stylesheet" crossorigin="anonymous">
    <script src="/assets/js/bootstrap.bundle.min.js"  crossorigin="anonymous"></script>
    <link href="/assets/css/main.css" rel="stylesheet">

</head>
<body>
<div class="container">
    <nav class="navbar navbar-expand-lg bg-body-tertiary">
        <div class="container-fluid">
            <a class="navbar-brand" href="#">焕新网</a>
            <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarScroll" aria-controls="navbarScroll" aria-expanded="false" aria-label="Toggle navigation">
                <span class="navbar-toggler-icon"></span>
            </button>
            <div class="collapse navbar-collapse" id="navbarScroll">
                <ul class="navbar-nav me-auto my-2 my-lg-0 navbar-nav-scroll" style="--bs-scroll-height: 100px;">
                    <li class="nav-item">
                        <a class="nav-link active" aria-current="page" href="#" th:href="@{'/administratorlist?uid='+${administrator.id}}">首页</a>
                    </li>
                    <li class="nav-item">
                        <a class="nav-link" href="#" th:href="@{'/commonlist?uid='+${administrator.id}}">用户管理</a>
                    </li>
                    <li class="nav-item dropdown">
                        <a class="nav-link" href="#" th:href="@{'/commoditycontrol?uid='+${administrator.id}}">商品管理</a>
                    </li>
                </ul>
            </div>
        </div>
    </nav>
</div>

<div class="center-table">
    <table>
    <thead>
      <tr>
        <th>用户id</th>
        <th>用户名</th>
        <th>用户密码</th>
        <th>用户手机号</th>
        <th>用户邮箱</th>
        <th>用户状态</th>

      </tr>
    </thead>
    <tbody>
      <tr class="col-sm-8"th:each="user:${userlist}">
        <td class="col-sm-8" th:text="${user.id}"></td>
        <td class="col-sm-8" th:text="${user.nickname}"></td>
        <td class="col-sm-8" th:text="${user.password}"></td>
        <td class="col-sm-8" th:text="${user.phone}"></td>
        <td class="col-sm-8" th:text="${user.email}"></td>
        <td class="col-sm-8" th:text="${user.status}"></td>
        <td>
            <form th:action="'/change?id='+${user.id}+'&uid='+${administrator.id}" th:method="post">
                <button type="submit" >禁言</button>
            </form>

        </td>
      </tr>
    </tbody>
    </table>
</div>

</body>
</html>